package com.alibaba.ai.controller;

import com.alibaba.ai.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 王振东
 */
@RestController
@RequestMapping("/index6")
public class SearchController {
    //小区房价搜索功能
    @Autowired
    private SearchService searchService;
    @GetMapping("/list2")
    public String getData(@RequestParam(value = "C_DISTRICT", required = false) String C_DISTRICT,
                          @RequestParam(value = "C_TRADINGAREA", required = false) String C_TRADINGAREA,
                          @RequestParam(value = "C_VILLAGENAME", required = false) String C_VILLAGENAME) {
        return searchService.selectBysearch(C_DISTRICT, C_TRADINGAREA, C_VILLAGENAME);
    }
}
